/**
 *    @file       cmd5.h
 *
 *    @brief      
 *    @details
 *
 *    @version    1.0
 *    @date       01/23/2014 10:25:18 AM
 *
 *    @author     Theophilus (), wangtf418@gmail.com
 */
#ifndef _BF_CMD5_H_
#define _BF_CMD5_H_
#include <openssl/md5.h>
#include "comdef.h"

class cmd5
{
public:	
	cmd5();
	~cmd5();

public:
	bf_int_t update(const bf_uchar_t *data, bf_size_t len);
	bf_int_t finish(bf_uchar_t hash[16]);

public:
	static bf_int_t md5(const bf_uchar_t *data, bf_size_t len, bf_uchar_t hash[16]);

private:
	bf_int_t m_initflag;
	MD5_CTX m_md5_ctx;
};

#endif

